
import { Button, Form, Spin } from "antd";
import TextArea from "antd/es/input/TextArea";
import { FieldType, useConfigNotice } from "../hooks/useConfigNotice";

export default function ConfigNotice() {
  const {loading,form,onFinish,btnLoading}= useConfigNotice()
  return (
    <Spin spinning={loading}>
      <Form
        form={form}
        name="configHomeText"
        size="middle"
        onFinish={onFinish}
        autoComplete="off"
        layout="vertical"
      >
        <Form.Item<FieldType>
          name="notice"
          label="通知"
          rules={[{ required: true, message: "请输入!" }]}
        >
          <TextArea />
        </Form.Item>
        <Form.Item>
          <Button type="primary" htmlType="submit" loading={btnLoading}>
            保存
          </Button>
        </Form.Item>
      </Form>
    </Spin>
  );
}
